package lib.gson;

import com.google.gson.Gson;

public class QuickStart {
    public static void main(String[] args) {
        User user = new User(1, "zing", "123456");
        System.out.println(user);
        Gson gson = new Gson();
        String s = gson.toJson(user);
        System.out.println(s);

        User u = gson.fromJson(s, User.class);
        System.out.println(u);
    }
}
